package lambda.Demo04;

public class Demo04InvokeCalc {
    public static void main(String[] args) {
       invokeCalc(10,5,(int a, int b)->{
           return a + b;
       });
       invokeCalc(100,50,(a,b)->a + b);
    }
    public static void invokeCalc(int a, int b, Calculator calculator){
        int result = calculator.calc(a,b);
        System.out.println("结果是"+result);
    }
}
